package job;

public class Day3Job04 {
    public static void main(String[] args) {
        double price = 2614.6;
        if (price >= 500) {
            price *= 0.8;
        }
        System.out.println("你的消费金额是：" + price);

        double score = 101;
        if (score >= 0 && score <= 100) {
            System.out.println("你的成绩是：" + score + ",     成绩合法");
        }
        System.out.println("继续执行");

        if (price >= 500) {
            price *= 0.8;
        } else {
            price *= 0.9;
        }
        System.out.println("你的消费金额是：" + price);


        if (score >= 0 && score <= 100) {
            System.out.println("你的成绩是：" + score + ",     成绩合法");
        } else {
            System.out.println("你的成绩是：" + score + ",     成绩不合法");
        }

        if (price >= 2000) {
            price *= 0.5;
        } else if (price > 1000) {
            price *= 0.7;
        } else if (price > 500) {
            price *= 0.8;
        } else {
            price *= 0.9;
        }
        System.out.println("你的消费金额是：" + price);


         /*
        System.out.println(5 % 2);
        System.out.println(4 & 2);
        System.out.println(2 % 5);

        int a = 5, b = 10, c = 5;
        a++;
        ++b;
        System.out.println(a);
        System.out.println(b);

        a--;
        b--;
        System.out.println(a);
        System.out.println(b);

        c = a++;
        int d = ++b;
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);

        int c1 = 5, d1 = 6;
        c1 = a--;
        d1 = --b;
        System.out.println(a);
        System.out.println(c1);
        System.out.println(d1);
        System.out.println(b);


        int aa = 5, bb = 10, cc = 5;
        boolean b2 = aa > bb;
        System.out.println(b2);
        System.out.println(cc < bb);
        System.out.println(aa >= cc);
        System.out.println(aa <= bb);
        System.out.println(aa == cc);
        System.out.println(aa != cc);
        System.out.println(aa % 2 == 0);
        System.out.println(aa + cc > bb);

        System.out.println(aa++ > 5);
        System.out.println(aa++ > 5);
        System.out.println(aa);

         */

        /*
        int a = 5, b = 10, c = 5;
        boolean b1 = b>=a && b<c;
        System.out.println(b1);
        System.out.println(b<=c && b>a);
        System.out.println(a==b && c>b);
        System.out.println(b!=c && a<b);
        int age = 40;
        System.out.println(age>=18 && age<=50);
        int score = 86;
        System.out.println(score>=0 && score<=100);


        System.out.println(b >= a || b < c);
        System.out.println(b <= c || b > a);
        System.out.println(b != c || a < b);
        System.out.println(a == b || b < c);
        int score = 95;
        System.out.println(score < 0 || score > 100);
        boolean b2 = !(a < b);
        System.out.println(b2);
        System.out.println(!(a > b));

        boolean b3 = a > b && c++ > 2;
        System.out.println(b3);
        System.out.println(c);

        int cc = 5;
        boolean b4 = a < b || cc++ > 2;
        System.out.println(b4);
        System.out.println(cc);

         */
        /*
        int a = 5;
        a += 10; //相当于a=(int)(a+10)
        System.out.println(a); //15
        a *= 2; //相当于a=(int)(a*2)
        System.out.println(a); //30
        a /= 6; //相当于a=(int)(a/6)
        System.out.println(a); //5

         */
        /*
        int age = 24;
        System.out.println("age");
        System.out.println(age);
        System.out.println("age="+age);
        System.out.println("我今年"+age+"岁了");

        String name = "JQ";
        System.out.println("大家好，我叫"+name);
        System.out.println("大家好，我叫"+name+"我今年"+age+"岁了");

        System.out.println(10+20+""+30);
        System.out.println(""+10+20+30);
        System.out.println(10+20+30+"");

         */
        /*
        int a = 5, b = 10;
        int sum = a > b ? a : b;
        System.out.println("最大值是：" + sum);

        int num = 5;
        int flag = num > 0 ? 1 : -1;
        System.out.println(flag);

         */
    }
}
